package cn.buk.api.shdl.request.dto;

public class RequestAirport {

  public static RequestAirport create(String code) {
    RequestAirport airport = new RequestAirport();
    airport.setName(code);

    return airport;
  }

  /**
   * 三字代码, 必需大写
   */
  private String name;

  /**
   * 类型
   * enum
   * 可为空
   * ["AIRPORT", "CITY"],为空
   * 时先按CITY 匹配，匹配不成功再按
   * AIRPORT 处理
   */
  private String type;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name.toUpperCase();
  }

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }
}
